<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="supplierList.title"/></title>
    
    <meta name="heading" content="<fmt:message key='supplierList.heading'/>"/>
    <meta name="menu" content="RoleAdminPurchase"/>
</head>

<div id="help">
    <h2>
        <a href="<c:url value='helpSupplierList.html?decorate=false'/>"
           title="Help supplier list"
           onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;">
               <fmt:message key="help"/>
        </a>
    </h2>
</div>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
        onclick="location.href='<c:url value="/editSupplier.html"/>'"
        value="<fmt:message key="button.add"/>"/>

    <input type="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />

<s:set name="suppliers" value="suppliers" scope="request"/>
<display:table name="suppliers" class="table" requestURI="" id="supplierList" export="true" pagesize="25">
    <display:column property="id" sortable="true" href="editSupplier.html"
        paramId="id" paramProperty="id" titleKey="supplier.id"/>
    <display:column property="razonSocial" sortable="true" titleKey="supplier.razonSocial"/>
    <display:column property="address" sortable="true" titleKey="supplier.address"/>
    <display:column property="nit" sortable="true" titleKey="supplier.nit"/>

    <display:column sortable="true" titleKey="person.name">
        <c:out value="${supplierList.firstName}"/>
        <c:out value="${supplierList.lastName}"/>
        <c:out value="${supplierList.lastName2}"/>
    </display:column>
    
    <display:setProperty name="paging.banner.item_name" value="supplier"/>
    <display:setProperty name="paging.banner.items_name" value="suppliers"/>

    <display:setProperty name="export.excel.filename" value="Supplier List.xls"/>
    <display:setProperty name="export.csv.filename" value="Supplier List.csv"/>
    <display:setProperty name="export.pdf.filename" value="Supplier List.pdf"/>
</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("supplierList");
</script>